home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / web / fweb / fweb-1.30 / manual / guide0.tex < prev    next >
Encoding:
Text File  |  1993-06-16  |  61.2 KB  |  1,541 lines

  1. % --- guide0.tex ---
  2. % FWEB reference guide.  Included either by guide.tex (stand-alone guide)
  3. % or fwebman.tex (the complete user's manual).
  4. %
  5. \FWEB\ is available ^^[\>{FWEB}!obtaining]
  6. via anonymous guest \.{ftp} from Internet host
  7. \.{lyman.pppl.gov}, a Sun SparcStation running \Unix.  Use binary mode to
  8. transfer a compressed \.{tar} file with a name like \.{fweb-1.30.tar.Z}.
  9. See the file \.{/pub/fweb/READ\_ME} for the current status, recent bug
  10. reports, and further instructions.
  11.  
  12. For those without \.{ftp} access, it is possible to emulate the function
  13. of~\.{ftp} 
  14. by sending a valid \.{ftp} session as a mail message to \.{bitftp@pucc.bitnet}.
  15. The requested files will be returned by mail, possible \.{uuencode}d  and
  16. broken up into several parts if they are sufficiently long.  A sample \.{ftp}
  17. session is
  18.  
  19. {\codemode
  20. ftp lyman.pppl.gov
  21. cd /pub/fweb
  22. get READ_ME
  23. quit
  24. }
  25. \noindent To learn more about the \.{bitftp} service, send a message
  26. containing the single word ``\.{help}'' to the above address.
  27.  
  28. To unpack the \.{tar} file, say
  29.  
  30. {\codemode
  31. uncompress fweb-1.30.tar
  32. tar -xvf fweb-1.30.tar
  33. }
  34.  
  35. A brief summary of the installation procedure can be found in the
  36. \.{READ\_ME.FWEB} file included in the subdirectory corresponding to the
  37. numbered release---e.g., \.{/pub/fweb/v1.30/READ\_ME.FWEB}.  \Unix\ users
  38. should do the following:
  39.  
  40. {\codemode
  41. cd fweb-1.30
  42. ./configure
  43. cd web
  44. make bootstrap
  45. make install
  46. }
  47.  
  48. More detailed installation information can be found in the separate file
  49. \.{INSTALL\_FWEB.tex} ^^:\>{INSTALL\UL FWEB.tex}: included with the \FWEB\
  50. release in the \.{manual} subdirectory.
  51.  
  52. \vfill\Eject
  53.  
  54. % ------------------------------ SYNTAX SUMMARY ------------------------------
  55.  
  56. \def\sectionbreak{\filbreak\bigskip}
  57.  
  58. \appendix L: SYNTAX SUMMARY.[][19.12.20]
  59.  
  60. ^^(syntax!summary(
  61. Here we summarize various of the important features of \FWEB.
  62. This material is intended to be for reference; please refer to the body of
  63. the user's manual for full details.
  64.  
  65. ^^[syntax!summary]
  66. \parskip=0pt plus1pt
  67. \long\def\summarize#1#2#3\par#4\par{\par{%
  68. \def\[##1]{[\.{##1}]}\def\(##1){(##1)}%
  69. \def\snext{#3}
  70. \ifx\snext\empty\def\starttext{}
  71.     \else\def\starttext{#3\medskip}\fi
  72. \subsubsection #1.\par\starttext
  73. \abovedisplayskip=0pt plus1pt
  74. $$\vbox{\halign{\quad\tt##\hfil&--- \ 
  75. \vtop{\hsize=#2\hsize\noindent\hang\strut\ignorespaces##\strut}\hfil\cr
  76.         #4}}$$}}
  77.  
  78. \def\Item{\itemitem{$\bullet$}}
  79.  
  80. ^^{\>{WEB}!phases of}
  81. \summarize{The \FWEB\ processors}{0.7}
  82.  
  83. FTANGLE & \It{Creates compilable code}.\endgraf
  84. \medskip
  85. \leftline{\bf Phase one:}^^{phase!1}
  86. \Item discards \TeX\ documentation;
  87. \Item tokenizes source;
  88. \Item expands~\.{@'\dots'}, \.{@"\dots"}, and \.{0b\It{binary}} (also
  89. \.{0\It{octal}} and \.{0x\It{hex}} in \Fortran);
  90. \Item stores code text in appropriate modules;
  91. \Item memorizes macro definitions (\.{@d} and~\.{@m}).\endgraf
  92. \medskip
  93. \leftline{\bf Phase two:}^^{phase!2}
  94. \Item outputs outer macro definitions (\.{@d});
  95. \Item outputs the unnamed module (\.{@a});
  96. \Item expands \WEB\ macros (\.{@m});
  97. \Item expands build-in macros;
  98. \Item translates \Ratfor\ statements.\endgraf
  99. \cr
  100. FWEAVE & \It{Typesets the documentation and code}.\endgraf
  101. \medskip
  102. \leftline{\bf Phase one:}^^{phase!1}
  103. \Item tokenizes and stores identifiers and module names;
  104. \Item collects cross-reference information (including processing~\.{@[}
  105. and~\.{@\`});
  106. \Item stores limbo text definitions (\.{@l});
  107. \Item collects information about overloaded operators~(\.{@v}) and
  108. identifiers~(\.{@W}).\endgraf 
  109. \medskip
  110. \leftline{\bf Phase two:}^^{phase!2}
  111. \Item outputs limbo text;
  112. \Item outputs special \TeX\ macros for overloaded operators;
  113. \Item copies \TeX\ material directly to output;
  114. \Item treats material between vertical bars (\.{|\dots|}) as code to be
  115. typeset; 
  116. \Item tokenizes and stores contents of each code section;
  117. \Item analyzes code syntax and converts to appropriate \TeX\ macros.\endgraf
  118. \medskip
  119. \leftline{\bf Phase three:}^^{phase!3}
  120. \Item typesets index and  module cross-references;
  121. \Item writes table of contents.\endgraf
  122. \cr
  123.  
  124.  
  125. \def\Oname(#1,#2){\It{name}.#1 {\rm (}#2{\rm)}}
  126.  
  127. \summarize{Files}{0.7}  The \FWEB\ system works with a variety of files.
  128. File names have the form \It{[path]}\./\It{root}\It{[.ext]}.  Here '\./'
  129. is called the \\{PREFIX\_END\_CHAR}.  ^^:\>{PREFIX\UL END\UL CHAR}:
  130. Since it differs for various operating systems, it can be changed in
  131. \.{custom.h}.  
  132. ^^{customizing!directory path specifications} ^^{\>{custom.h}}
  133. The character that initiates the file-name extension (normally a period)
  134. can be changed with the `\.{-E}'~command-line option. ^^{\={-e}{-E}}
  135.  
  136. \subheading{Input files:}
  137. \It{null file}&The system sometimes reads from the null file.  This name
  138. varies from system to system; the default can be defined in \.{custom.h},
  139. or it can be changed with the style-file parameter \.{null\_file}.
  140. ^^{file!null} ^^{customizing!null-file name}
  141. ^^{style file!vocabulary!\>{null\UL file}}\cr
  142. .fweb{\rm\ (or }fweb.ini{\rm)} & Initialization file; always in the
  143. \It{home} directory. 
  144. ^^{directory!home}
  145. The basic file name can be overridden by the environment variable
  146. \.{FWEB\_INI}. ^^{\>{FWEB\UL INI}} (It can also be changed in \.{custom.h},
  147. although this is strongly discouraged.)\cr 
  148. fweb.sty & Style file; in \It{current} directory ^^{directory!current}
  149. unless overridden by
  150. environment variable \.{FWEB\_STYLE\_DIR}.  ^^{\>{FWEB\UL STYLE\UL DIR}}
  151. The basic name can be changed by
  152. the `\.{-z}'~option. ^^{\>{-z}} (It can also be changed in \.{custom.h},
  153. although this is strongly discouraged.)\cr
  154. \It{name}.web & Source code.  (Alternative suffixes can be searched for
  155. automatically with the `\.{-e}'~option and the \.{ext.web} style-file entry.)
  156. ^^{\>{-e}} ^^{style file!vocabulary!\>{ext.web}}\cr
  157. \It{name}.ch & Change file.  (Suffixes are treated as above, but see
  158. \.{ext.change}.) 
  159. ^^{style file!vocabulary!\>{ext.change}}\cr 
  160. \It{name}.hweb & Code included into \.{web} file with~\atcmd{i}. Include
  161. files are searched for in the path set by the environment variable
  162. \.{FWEB\_INCLUDES} ^^{\>{FWEB\UL INCLUDES}} ^^{path!for include files}
  163. and/or the \.{-I}~option; ^^{\={-i}{-I}}
  164. if that path is empty, then the current directory is searched. (Suffixes
  165. are treated as above, but see \.{ext.hweb}.) ^^{style
  166. file!vocabulary!\>{ext.hweb}}\cr 
  167. \It{name}.hch & Change file for include file.  (Suffixes are treated as
  168. above, but see \.{ext.hchange}.) ^^{style file!vocabulary!\>{ext.hchange}}\cr 
  169. \subheading{Output files:}
  170. \It{name}.tex & Woven output; can be processed with either Plain \TeX\ or
  171. \LaTeX.\cr 
  172. \noalign{\smallskip}
  173. CONTENTS.tex & Accumulates table-of-contents information written by
  174. \FWEAVE.  (This name can be overridden by the style-file option
  175. \.{contents.tex}.) 
  176. ^^{\>{CONTENTS.tex}} ^^{style file!vocabulary!\>{contents.tex}}\cr 
  177. INDEX.tex & Stores indexing information written by \FWEAVE.  (This name can
  178. be overridden by the style-file option \.{index.tex}.) 
  179. ^^{\>{INDEX.tex}} ^^{style file!vocabulary!\>{index.tex}}\cr
  180. MODULES.tex & Stores module list written by \FWEAVE.  (This name can be
  181. overridden by the style-file option \.{modules.tex}.) 
  182. ^^{\>{MODULES.tex}} ^^{style file!vocabulary!\>{modules.tex}}\cr
  183. \noalign{\smallskip}
  184. \It{name.ext} & Compilable output file; see table below for the extension
  185. associated with each language.\cr
  186.  
  187. \indent When the `\.{-e}'~option is in effect, ^^{\>{-e}}
  188. input file names that include no
  189. period are completed automatically according to the style-file entries
  190. listed in the following table:
  191. ^^:file name!extensions:
  192. $$\vbox{\offinterlineskip
  193. \halign{\vrule\vrule#&\strut\quad#\quad\hfil&\vrule#&\hfil\quad\tt#\quad\hfil
  194.     &\vrule#&\hfil\quad\tt#\quad\hfil&\vrule\vrule#\cr\tablerule\tablerule
  195. &\It{Type of file}&&\It{Style-file entry}&&\It{Default}&\cr
  196. \tablerule\tablerule 
  197. &\WEB\ file&&ext.web&&.web&\cr\tablerule
  198. &Change file&&ext.ch&&.ch&\cr\tablerule
  199. &Include file&&ext.hweb&&.hweb&\cr\tablerule
  200. &$\vcenter{\hbox{\strut Change file}\hbox{for include
  201. file\strut}}$&&ext.hch&&.hch&\cr \tablerule\tablerule
  202. }}$$
  203.  
  204. The default extension for the file(s) output by \FTANGLE\ sometimes depends on
  205. whether the operating system is \Unix\ or not.  (These defaults can be
  206. overridden by style-file parameters, as indicated.)
  207.  ^^{extensions!file-name}
  208.  ^^{style file!vocabulary!\>{suffix.C}}
  209.  ^^{style file!vocabulary!\>{suffix.Cpp}}
  210.  ^^{style file!vocabulary!\>{suffix.N}}
  211.  ^^{style file!vocabulary!\>{suffix.N90}}
  212.  ^^{style file!vocabulary!\>{suffix.K}}
  213.  ^^{style file!vocabulary!\>{suffix.R}}
  214.  ^^{style file!vocabulary!\>{suffix.R90}}
  215.  ^^{style file!vocabulary!\>{suffix.X}}
  216. $$\vbox{\offinterlineskip
  217. \halign{\vrule\vrule#&\strut\quad#\quad\hfil&\vrule#
  218.     &\quad\tt#\quad\hfil&\vrule#%
  219.     &\hfil\quad\tt#\quad\hfil&\vrule#%
  220.     &\hfil\quad\tt#\quad\hfil&\vrule\vrule#\cr\tablerule\tablerule
  221. &\hfil\It{Language}&&\hfil\It{Style-file
  222. entry}&&$\vcenter{\it\hbox{\strut \Unix}\hbox{default\strut}}$ 
  223. &&$\vcenter{\it\hbox{\strut Non-\Unix}\hbox{default\strut}}$&\cr 
  224. \tablerule\tablerule 
  225. &\tt C&&suffix.C&&.c&&.c&\cr\tablerule
  226. &\tt \Cpp&&suffix.Cpp&&.c++&&.cpp&\cr\tablerule
  227. &\tt FORTRAN--77&&suffix.N&&.f&&.for&\cr\tablerule
  228. &\tt FORTRAN--90&&suffix.N90&&.f&&.for&\cr\tablerule
  229. &\tt MAKE&&suffix.K&&.mk&&.mk&\cr \tablerule
  230. &\tt RATFOR--77&&suffix.R&&.f&&.for&\cr\tablerule
  231. &\tt RATFOR--90&&suffix.R90&&.f&&.for&\cr\tablerule
  232. &\tt TEX&&suffix.X&&.sty&&.sty&\cr\tablerule\tablerule
  233. }}$$
  234.  
  235. \summarize{Environment variables}{0.7}
  236. Environment variables ^^{environment variables} in \Unix\ and logical names
  237. in VMS behave in the same way. 
  238.  
  239. FWEB\_INCLUDES &^^{\>{FWEB\UL INCLUDES}} Colon-delimited list (identical in
  240.   format to the Unix C-shell \.{PATH} variable)  of
  241.   directories to search for include files. ^^{path!for include files}
  242.   (One can append to this list by means of the \.{-I}~option.) ^^{\={-i}{-I}}
  243.   ^^{environment variables!\>{FWEB}!\>{FWEB\UL INCLUDES}}
  244.   \cr
  245. FWEB\_INI &^^{\>{FWEB\UL INI}} Name of the initialization file---e.g.,
  246.   \.{fweb.ini}.  If not defined, either \.{.fweb} or~\.{fweb.ini} is chosen,
  247.   depending on the machine.  The initialization file always resides in
  248.   \.{\$HOME}. ^^{\>{.fweb}} ^^{\>{fweb.ini}}
  249.   ^^{environment variables!\>{FWEB}!\>{FWEB\UL INI}}
  250.   \cr 
  251. FWEB\_STYLE\_DIR &^^{\>{FWEB\UL STYLE\UL DIR}} Directory in which style file
  252.   resides---e.g., \.{\$HOME/fweb}.  If not defined, the current directory is
  253.   used.
  254.   ^^{environment variables!\>{FWEB}!\>{FWEB\UL STYLE}}
  255.   \cr 
  256. HOME &^^{\>{HOME}} Name of the home directory.  This variable should be
  257.   defined by \Unix.
  258.   ^^{environment variables!Unix!\>{HOME}}
  259.   \cr
  260. TERM &^^{\>{TERM}} The terminal type.  Defined by \Unix.
  261.   ^^{environment variables!Unix!\>{TERM}}
  262.   \cr
  263.  
  264. \indent To change an environment variable, say, for example (in \Unix)
  265.  
  266. {\codemode
  267. setenv FWEB_INCLUDES .:$HOME/fweb:/usr/xxx/stuff
  268. setenv FWEB_INI my_FWEB.ini
  269. \Par
  270. }
  271. \noindent For VMS, substitute ``\.{define}'' for ``\.{setenv}''.
  272. \medskip
  273. The built-in function \.{\_GETENV(\It{ENV})} expands to the value of the
  274. environment variable~\\{ENV}.
  275. ^^{environment variable!obtaining value of}
  276.  
  277. \subsubsection Order of initial operations.
  278.  
  279. \FWEB\ begins its processing by performing the following operations:
  280. ^^[processing!order of]
  281.  
  282. {\narrower\newfeature
  283. \medskip
  284. \feature. Evaluate environment variables.
  285.  
  286. \feature. Read initialization file \.{.fweb}.
  287.  
  288. \feature. Execute \.{.fweb} options beginning with~'\.+'.
  289.  
  290. \feature. Read and execute the command line.
  291.  
  292. \feature. Execute remaining \.{.fweb} options.
  293.  
  294. \feature. Read the style file \.{fweb.sty}.
  295.  
  296. \feature. Process the \WEB\ file.
  297.  
  298. }
  299.  
  300. \def\arg#1{{\it[#1]}}
  301.  
  302. \summarize{Command-line syntax}{0.7}
  303. ^^{syntax!command-line} ^^{command line!syntax}
  304. The command-line syntax is
  305. $$\left\{\matrix{\hbox{\FWEAVE}\cr\hbox{\FTANGLE}\cr}\right\}
  306. \hbox{ \It{web\_file\_name} [\It{change\_file\_name}] [\It{options}]}
  307. $$ 
  308. where the command-line options, 
  309. ^^{options, command-line} ^^{command line!options} 
  310. each of which must begin with a hyphen,
  311. are summarized below.  (Actually, the options can appear before the file
  312. names, or can even be intermixed with them.)  If an option has an argument,
  313. no space should precede the argument.  (E.g., say ``\.{-zmy.sty}'', not
  314. ``\.{-z\ my.sty}''.)  In the descriptions of the options,
  315. the letters~\.T or~\.W in brackets denotes to which
  316. processor the command applies; no brackets at all means it applies to both
  317. processor. Similarly, parenthesized~\.C, \.N, \.R, or~\.X denotes the
  318. applicable 
  319. language. Italic brackets, as in \.{-d}\It{[nnnnn]}, indicate an optional
  320. argument; the brackets themselves shouldn't be typed. Stars mean the
  321. command is \It{not} allowed to be optionally changed along with a language
  322. change, according to the format `\atcmd{$l$[\It{options}]}' or
  323. `\atcmd{L$l$[\It{options}]}'. 
  324.  
  325. \par
  326.  
  327. \summarize{Command-line options {\tt a}--{\tt q}}{0.7}
  328.  
  329. -0 &^^{\>{-0}} Turn off \WEAVE's debugging mode.  \[W]. 
  330.     ^^{debugging!turning off}\cr 
  331. -1 &^^{\>{-1}} Turn on brief debugging mode. (Display irreducible scraps.)
  332.     \[W]. ^^{debugging!turning on!limited}\cr 
  333. -2 &^^{\>{-2}} Turn on verbose debugging mode. (Display detailed reductions
  334.     of the scraps.) \[W]. ^^{debugging!turning on!verbose}\cr
  335. -A &^^{\={-a}{-A}} Turn on \&{ASCII} translations. ^^{ASCII!turning on
  336.     translations to}\cr
  337. -b &^^{\>{-b}} Number \&{do} and \&{if}~blocks in woven \Fortran\ and \Ratfor\
  338.     output.  \[W]. ^^{block numbers}\cr
  339. \lstar -c &^^{\>{-c}} Set the global language to~C. ^^{language!global!C}\cr
  340. \lstar -c++ &^^{\>{-c++}} Set the global language to~\Cpp.
  341.     ^^{language!global!\Cpp}\cr 
  342. -D\It{[letters]}&^^{\={-d}{-D}} Display information about reserved words of the
  343.     current language (beginning with \It{letters} if present).
  344.     ^^{reserved words!displaying}\cr
  345. -d\It{[nnnnn]} &^^{\>{-d}} Convert unnumbered `\.{do\dots enddo}'
  346.     constructions to standard \Fortran--77.  \[T]; \(N). 
  347.     ^^{\<{do}!numbering}\cr
  348. -E$c$ &^^{\={-e}{-E}} Change the delimiter of a file-name extension from the
  349.     default~'\..' to~$c$.
  350.     ^^{extensions!file-name!changing delimiter for}\cr
  351. -e &^^{\>{-e}} Turn on automatic file-name completion.  (See discussion of
  352.     the style file entries \.{ext.*}.) ^^{file name!automatic
  353.     completion of}\cr
  354. -f &^^{\>{-f}} Turn off module references for identifiers.  \[W].
  355.     ^^{module!references!turning off}\cr
  356. \lstar -h &^^{\>{-h}} Get help from the command line. \It{(Not implemented
  357.     yet.)} ^^{help!command line}\cr 
  358. -I\It{directory} &^^{\={-i}{-I}} Append a directory or colon-delimited list
  359.     of directories to the list of directories to be searched for include
  360.     files. \cr 
  361. -i &^^{\>{-i}} Read include files named by the \atcmd{I}~command, but
  362.     do not print their contents.  \[W]. ^^{file!including!not
  363.     printing}\cr 
  364. -i! &^^{\>{-i"!}} Don't even read include files named by the
  365.     \atcmd{I}~command. \[W]. \cr   
  366. \lstar -L\It{l} &^^{\={-l}{-L{\it l}}} Select global language: $l \in
  367.     \{\.c,\.n,\.r,\.x\}$. 
  368.     ^^{language!selecting}\cr 
  369. -l\It{[mmm[:nnn]]} &^^{\>{-l}} Echo the input line constructed by the
  370.     input driver between lines~\It{mmm} and~\It{nnn}.
  371. ^^{debugging!echoing input lines}\cr
  372. \lstar -m\It{id[=text]} &^^{\>{-m}} Define a \WEB\ macro.  \[T]. \cr
  373. -m4 &^^{\>{-m4}} Understand the \.{m4} built-in commands.  \[W].
  374.     ^^{\>{m4}!understanding commands of}\cr
  375. -m; &^^{\>{-m;}} Automatically append a pseudo-semicolon to \WEB\ macro
  376.     definitions. \[W]. ^^{pseudo-!semicolon!appending automatically}\cr 
  377. \lstar -n &^^{\>{-n}} Set the global language to \Fortran--77.
  378.     ^^{language!global!Fortran--77\actual\FORTRAN--77}\cr 
  379. \lstar -n9 &^^{\>{-n9}} Set the global language to \Fortran--90.
  380.     ^^{language!global!Fortran--90\actual\FORTRAN--90}\cr 
  381. -n; &^^{\>{-n;}} For \Fortran--77, supply semicolons automatically.
  382.     (Default mode.) ^^{semicolons!automatic!Fortran:\FORTRAN}\cr
  383. -nb &^^{\>{-nb}} In \Fortran, number the \&{if}s and \&{do}s.  \[W]; \(N). 
  384.     ^^{block numbers!\Fortran}\cr
  385. -np &^^{\>{-np}} Print semicolons in woven \Fortran\ output.  \[W].
  386.     ^^{semicolons!printing}\cr 
  387. -n\BS &^^{\>{-n\BS}} Select free-form \Fortran--90 syntax continued with a
  388.     backslash. ^^{syntax!free-form!continuing with backslash}\cr 
  389. -n\amp & ^^{\>{-n\amp}} As above, but continue with an ampersand.
  390.     ^^{syntax!free-form!continuing with ampersand}\cr
  391. -n/ &^^{\>{-n/}} In \Fortran, make '\.{//}'~denote the start of
  392.     a short comment instead of  concatenation.  (One can always
  393.     use~'\.{\\/}' for concatenation.) ^^{comment!short!recognizing in
  394.     \FORTRAN}\cr 
  395. -n! &^^{\>{-n"!}} In \Fortran, make
  396.     `\.!'~denote the start of a short comment instead of the logical
  397.     \.{NOT}.\cr 
  398. -o &^^{\>{-o}} Turn off \FWEAVE's mechanisms for overloading operators. \[W].
  399.     ^^{operator!overloading!turning off}\cr
  400. \lstar -P\It{letter} &^^{\={-p}{-P}} Selects the \TeX\ processor for \FWEAVE's
  401.     output.  Say~`\.{-PL}' for \LaTeX; the default is~`\.{-PT}' for \TeX.
  402.     \[W].
  403.     ^^{\TeX\ processor, selecting}
  404.     ^^{processor!\TeX} ^^{processor!\LaTeX}
  405.     \cr
  406. \lstar -p\It{styleentry} &^^{\>{-p}} Buffer up a style-file entry, to be
  407.     processed just before the local style file is read.
  408.     ^^{style file!global entry}\cr
  409. -q &^^{\>{-q}} Do \It{not} translate \Ratfor\ commands into \Fortran.  (No
  410.     longer supported.) \[T]; \(R). \cr
  411.  
  412. \summarize{Command-line options {\tt r}--{\tt z}}{0.7}
  413.  
  414. \lstar -r &^^{\>{-r}} Set the global language to \Ratfor--77.
  415.     ^^{language!global!Ratfor--77:\RATFOR--77}\cr 
  416. \lstar -r9 &^^{\>{-r9}} Set the global language to \Ratfor--90.
  417.     ^^{language!global!Ratfor--90:\RATFOR--90}\cr 
  418. -rb &^^{\>{-rb}} In \Ratfor, number the \&{if}s and \&{do}s.  \[W]; \(N). 
  419.     ^^{block numbers!\Ratfor}\cr
  420. -rg\It{params} &^^{\>{-rg}} Set the \&{goto} parameters for \Ratfor's
  421.     \&{switch}. \[T]; \(R).\cr 
  422. -rk\It{[letters]} &^^{\>{-rk}} Suppress particular comments about \Ratfor\
  423.     statement translation.  \[T]; \(R).
  424.     ^^{Ratfor:\RATFOR!commands!deleting}\cr 
  425. -rK\It{[letters]} &^^{\={-rk}{-rK}} As above, but write out particular
  426.     comments. \[T]. \cr 
  427. -r; &^^{\>{-r;}} Turns on \Ratfor's auto-semi mode, and tells it to
  428.     use the ``obviously continued'' syntax.  \(R).
  429.     ^^{semicolons!automatic!Ratfor:\RATFOR}\cr
  430. -r/ &^^{\>{-r/}} In \Ratfor, make `\.{//}'~denote the start of
  431.     a short comment instead of  concatenation.  (One can always
  432.     use~'\.{\\/}' for concatenation.)  \(R).
  433.     ^^{comment!short!recognizing in \RATFOR}\cr
  434. -r!&^^{\>{-r"!}} In \Ratfor, make `\.!'~denote the start of a short comment
  435.     instead of the logical \.{NOT}. \cr 
  436. \lstar -s &^^{\>{-s}} Print statistics about memory usage. ^^{statistics}\cr
  437. \lstar -sm\It{[nnn]} &^^{\>{-sm}} As above, but also display the dynamic
  438.     memory     allocations of size $\ge$~\It{nnn} as they occur.
  439.     ^^{memory, dynamic allocation of!statistics for}\cr
  440. \lstar -t\It{ln[\{\dots\}]} &^^{\>{-t}} Truncate identifiers of
  441.     language~$l$ to length~$n$, after optionally filtering out the
  442.     characters listed between the braces. \[W].\cr
  443. \lstar -u\It{id} &^^{\>{-u}} Undefine a predefined or command-line macro.
  444.     \[T]. ^^{macro!outer!undefining}\cr 
  445. -v &^^{\>{-v}} Make all comments verbatim.  \[T].
  446.     ^^{comment!verbatim!making all}\cr
  447. -W\It{letters} &Commands that apply only to \FWEAVE.  Here \It{letters} may
  448.     be one or more of the following:
  449.     \clo{
  450.     [&^^{\={-w[}{-W[}} Turn on special processing of bracketed array
  451.         indices.\cr 
  452.     f&^^{\={-wf}{-Wf}} Don't print format statements (\.{@f}) in woven
  453.         output.\cr
  454.     l&^^{\={-wl}{-Wl}} As above, but for limbo statements (\.{@l}).\cr
  455.     m&^^{\={-wm}{-Wm}} As above, but for macro definitions (\.{@m}).\cr
  456.     v&^^{\={-wv}{-Wv}} As above, but for operator overloading 
  457.         (\.{@v}).\cr     
  458.     w&^^{\={-ww}{-Ww}} As above, but for identifier overloading
  459.         (\.{@W}).\cr
  460.     \noalign{\vskip-5pt}
  461.     }\cr
  462. \lstar -w\It{[file\_name]} &^^{\>{-w}} If \It{file\_name}~is absent,
  463.     don't print `\.{\\input\ fwebmac.sty}' as the first line of the
  464.     \.{TEX} output file.   Otherwise, print `\.{\\input
  465.     \It{file}\_\It{name}}'. \[W].     ^^{\>{fwebmac}!\>{.sty}!not
  466.     printing}\cr
  467. \lstar -X\It{[letters]} &^^{\={-x}{-X}} Print selected cross-reference
  468.     information; the opposite of~`\.{-x}'.
  469.     ^^{cross-references!suppressing}
  470.     ^^{index!printing}
  471.     ^^{module list!suppressing}
  472.     ^^{table of contents!suppressing}\cr
  473. \lstar -x\It{[letters]} &^^{\>{-x}} Reduce or eliminate cross-reference
  474.   information.  The optional letters can be one of~'\.c',
  475.   '\.i', '\.m', or~'\.*', referring respectively to the table of contents,
  476.   index, module list, or all cross-reference information. \[W].
  477.       ^^{index!not printing}\cr 
  478. \lstar -y\It{[a[a]][nnnn]} &^^{\>{-y}} Override default for dynamic memory
  479.     allocation.  If \It{nnnn} is omitted, then
  480.     simply query the default instead of overriding it.  The simple
  481.     command~`\.{-y}' with no argument queries everything.
  482.     ^^{memory, dynamic allocation of!syntax}\cr 
  483. -Z\It{[letters]}&^^{\={-z}{-Z}} Display default values of style-file parameters
  484.     (starting with \It{letters} if present).
  485.     ^^{style file!parameters!default values of}\cr
  486. \lstar -z\It{[name]} &^^{\>{-z}} Override default style-file name.
  487.     ^^{style file!new name for}\cr
  488.  
  489. \summarize{Command-line options (miscellaneous)}{0.7}
  490.  
  491. -. &^^{\>{-.}} Don't recognize ``dot constants'' in \Fortran\ or \Ratfor.
  492.     ^^{constant!dot}\cr
  493. -\BS &^^{\>{-\BS}} Explicitly escape continued strings.
  494.     ^^{strings!continuing!with explicit escape}\cr
  495. -( &^^{\>{-(}} Continue parenthesized strings with backslashes.
  496.     ^^{strings!parenthesized!continuing}\cr 
  497. -:\It{[nnnnn]} &^^{\>{-":}} Set the starting automatic statement number.
  498.     \[T]. ^^{statement!number!setting}\cr 
  499. \lstar ->\It{[l=][name]} &^^{\>{->}} Redirect tangled output.
  500.     ^^{output!redirection}\cr 
  501. \lstar -= &^^{\>{-=}} Redirect tangled output. Synonymous with~`\.{->}'.
  502.     Easy to type under \Unix.\cr 
  503. -\# &^^{\>{-\PM}} Turn off comments about line numbers and module
  504.     names in tangled output. \[T] ^^{line numbers!turning off}\cr
  505. -+ &^^{\>{-+}} Don't interpret the compound assignment operators. \[T];
  506.     \(N,R). ^^{operators!compound assignment!not recognizing}\cr 
  507. -/ &^^{\>{-/}} In both \Fortran\ and \Ratfor, make `\.{//}'~denote the start of
  508.     a short comment instead of  concatenation.  (One can always
  509.     use~'\.{\\/}' for concatenation.)\cr
  510. -! &^^{\>{-"!...}} In both \Fortran\ and \Ratfor, make 
  511.     `\.!'~denote the start of a short comment instead of the logical
  512.     \.{NOT}.\cr 
  513.  
  514. \noindent These command-line options may also be put into the ini file
  515. \.{.fweb}. 
  516. ^^{\>{.fweb}} 
  517. Options beginning with a plus sign are processed \It{before} the
  518. command-line options. Otherwise, they are processed after the command-line
  519. options. 
  520.  
  521. {%\tracingall
  522. \summarize{Modules}{0.7}
  523. ^^[modules!summary of]
  524. \Item Module names are delineated by \.{@<\dots@>}.  
  525. ^^{section name!beginning!in code}
  526. \Item To reference a named module in a macro definition, say
  527. `\.{\#<\dots@>}' instead of \atcmd{<\dots@>}. 
  528. ^^{section name!beginning!in macro}
  529. \Item The unnamed module is begun by~\atcmd{A} or~\atcmd{a}.  (The latter
  530. command inserts an implicit~\atcmd{[}.) 
  531. \Item \FTANGLE\ outputs the unnamed module.  \It{(There must be at least one
  532. unnamed section, otherwise there will be no output!)}
  533.  
  534. \TeX\ part & \It{Arbitrary \TeX\ documentation}.\endgraf
  535. \medskip
  536. \Item Begins with~\atcmd{*} or~\atcmd{\ }.
  537. \Item Change to code mode with~\.{|\dots|}.\endgraf
  538. \cr
  539. definition part & \It{Macro definitions, formatting, limbo text, operator overloading, etc.}\endgraf
  540. \medskip
  541. \Item Begins with~\atcmd{m}, \atcmd{d}, \atcmd{f}, \atcmd{l}, \atcmd{v},
  542. or~\atcmd{\#...}.\endgraf 
  543. \cr
  544. code part & \It{The source code.}\endgraf
  545. \medskip
  546. \Item Begins with~\atcmd{a} or~\atcmd{<}.
  547. \Item \TeX\ mode inside comments.
  548. \Item Ends with~\atcmd{*} or~\atcmd{\ }.  (The end of file is like 
  549. an~\atcmd{\ }.)\endgraf
  550. \cr
  551.  
  552. \subsubsection The simplest \WEB\ sources. 
  553.  
  554. The absolutely simplest nontrivial \WEB\ source file is ``\.{@\ @a}''.  The
  555. next simplest is
  556. ^^[\>{WEB}!source file!simplest]
  557.  
  558. {\codemode
  559. @* EMPTY.
  560. @a
  561. \Par
  562. }
  563. \noindent These have a null definition part as well as a null code part.  The
  564. simplest \Fortran--77 code is
  565.  
  566. {\codemode
  567. @n
  568. @* FORTRAN.
  569. @a
  570. \Tab program main
  571. \Tab end
  572. \Par
  573. }
  574. \noindent The same code in \Ratfor\ is
  575.  
  576. {\codemode
  577. @r
  578. @* RATFOR.
  579. @a
  580. program main
  581. \{\}
  582. \Par
  583. }
  584. \noindent The corresponding code in~C is
  585.  
  586. {\codemode
  587. @c
  588. @* C.
  589. @a
  590. main()
  591. \{\}
  592. \Par
  593. }
  594.  
  595. \summarize{Control codes allowed in \WEB\ files}{0.62} ^^[commands!control
  596. codes!in \>{WEB} source]
  597.  
  598. \subheading{Literal control characters:}
  599. @@ &^^{\>{@@}} Insert the single character~\atcmd{}.\cr
  600. @| &^^{\>{@"|}} Insert a vertical bar (\TeX\ text only).  In code mode,
  601. this command means an optional line break; see the ``Spacing'' commands
  602. below. ^^{vertical bar, literal}\cr 
  603. \subheading{Beginning of module:}
  604. @\.\  &^^{\>{@\ }} Begin a new minor
  605. (unstarred) module. ^^{module!beginning!unstarred} \cr 
  606. @*\It{[n]} &^^{\>{@*}} Begin a new major (starred) module of level~$n$.
  607. ^^{module!beginning!starred} \cr  
  608. \subheading{Beginning of code part:}
  609. @< &^^{\>{@<...@>}} ^^{\>{@<}} Begin a module name.
  610. ^^{module!name!beginning} \cr  
  611. @> &^^{\>{@>}} End a module name. ^^{module!name!ending} \cr
  612. \medalign
  613. @A &^^{\={@a}{@A}} Begin the code part of an unnamed module.
  614. ^^{module!part!code} \cr  
  615. @a &^^{\>{@a}} Equivalent to `\atcmd{A@[}'.\cr
  616. \subheading{Control codes \.{b}--\.{z}:}
  617. @b &^^{\>{@b}} Insert a ^{breakpoint command} in a \WEB\ module.\cr
  618. \medalign
  619. @c &^^{\>{@c}} Set the language to~C. ^^{language!setting!C}\cr
  620. @c++ &^^{\>{@c++}} Set the language to~\Cpp. ^^{language!setting!\Cpp}\cr
  621. \medalign
  622. @D &^^{\={@d}{@D}} Define an outer macro. ^^{macro!outer!defining}\cr
  623. @d &^^{\>{@d}} Equivalent to `\atcmd{D@[}'.\cr
  624. \medalign
  625. @e &^^{\>{@e}} Invisible (pseudo-) expression.\cr
  626. @f &^^{\>{@f}} Format an identifier or module name.
  627. ^^{formatting!identifiers} ^^{formatting!module names}\cr
  628. \medalign
  629. @I &^^{\={@i}{@I}} Include a file, but don't print it out if the \.{-i}~option
  630. is used.\cr
  631. @i &^^{\>{@i}} Include a file. ^^{file!including}\cr
  632. \medalign
  633. @L$l$ &^^{\={@l}{@L{\it l}}} Set language to~$l$. ^^{language!setting}\cr
  634. @l &^^{\>{@l}} Specify limbo text. ^^{limbo!text}\cr
  635. \medalign
  636. @M &^^{\={@m}{@M}} Define a \WEB\ macro. ^^{macro!inner!defining}\cr
  637. @m &^^{\>{@m}} Equivalent to `\atcmd{M@[}'.\cr
  638. \medalign
  639. @n &^^{\>{@n}} Set the language to \Fortran--77. 
  640.     ^^{language!setting!Fortran--77:\FORTRAN--77}\cr
  641. @n9 &^^{\>{@n9}} Set the language to \Fortran--90.
  642.     ^^{language!setting!Fortran--90:\FORTRAN--90}\cr 
  643. \medalign
  644. @O &^^{\>{@O}} Open new output file (global scope).  
  645.     ^^{file!output!opening new}\cr 
  646. @o &^^{\>{@o}} Open new output file (local scope). 
  647.     ^^{file!output!opening new}\cr
  648. \medalign
  649. @r &^^{\>{@r}} Set the language to \Ratfor--77.
  650.     ^^{language!setting!Ratfor--77:\RATFOR--77}\cr 
  651. @r9 &^^{\>{@r9}} Set the language to \Ratfor--90. 
  652.     ^^{language!setting!Ratfor--90:\RATFOR--90}\cr
  653.  
  654. \summarize{Control codes allowed in \WEB\ files, cont'd}{0.62}
  655.  
  656. @u &^^{\>{@u}} Undefine an outer macro. ^^{macro!outer!undefining}\cr
  657. \medalign
  658. @v &^^{\>{@v}} Overload an operator. ^^{operators!overloading}\cr
  659. @W &^^{\>{@W}} Overload an identifier. ^^{identifiers!overloading}\cr
  660. \medalign
  661. @x &^^{\>{@x}} Terminates ignorable material (begun by~\atcmd{z} at beginning
  662. of source or include file). ^^{ignorable material!terminating}\cr
  663. @z &^^{\>{@z}} Begins ignorable material at beginning of source or include
  664. file. ^^{ignorable material!beginning}\cr
  665. \subheading{Conversion to ASCII:}
  666. @' &^^{\>{@'}} Convert single character to ASCII.
  667. ^^{ASCII!converting to}\cr
  668. @" &^^{\>{@""}} Convert string to ASCII.  (In \Fortran\ or \Ratfor, generate
  669. a call to the function named by the style-file field \.{ASCII\_fcn}.)
  670. ^^{ASCII!converting to}\cr
  671. \subheading{Markers for forward referencing:}
  672. @[ &^^{\>{@[}} Mark the next identifier as defined in this module.
  673. ^^{identifiers!marking as defined}\cr
  674. @] &^^{\>{@]}} \It{Reserved}; do not use.\cr
  675. @` &^^{\>{@`}} \It{Reserved}; do not use.\cr
  676. \subheading{Comments:}
  677. @/* &^^{\>{@/}} Begin a long verbatim comment. ^^{comment!long!beginning}\cr
  678. @// &^^{\>{@/}} Begin a short verbatim comment.
  679. ^^{comment!short!beginning}\cr 
  680. @\% &^^{\>{@\PC}} An ignorable comment:  Everything to the next newline is
  681. completely ignored. ^^{comment!ignorable}\cr
  682. @? &^^{\>{@?}} Begin a compiler directive. ^^{compiler
  683. directives!beginning}\cr 
  684. @! &^^{\>{@"!}} Begin a compiler directive (obsolete). ^^{compiler
  685. directives!beginning}\cr 
  686. @( &^^{\>{@(}} Begin a meta-comment. ^^{comment!meta-!beginning}\cr
  687. @) &^^{\>{@)}} End a meta-comment. ^^{comment!meta-!ending}\cr
  688. \subheading{Special brace:}
  689. @\{ &^^{\>{@\LB}} Suppress default insertion of breakpoint command.
  690. ^^{breakpoint command!suppressing insertion of}\cr
  691. \subheading{Index entries:}
  692. @\UL &^^{\>{@\UL}} Force an index entry to be underlined.
  693. ^^{index!entry!underlining} \cr 
  694. @- &^^{\>{@-}} Delete an index entry for the next identifier.
  695. ^^{index!entry!deleting}\cr
  696. \medalign
  697. @\^ &^^{\>{@\^}} Make an index entry in Roman type. ^^{index!entry!Roman
  698. type}\cr  
  699. @. &^^{\>{@.}} Make an index entry in \.{typewriter} type.
  700. ^^{index!entry!typewriter type}\cr 
  701. @9 &^^{\>{@9}} Make an index entry in a format controlled by `\.{\\9}',
  702. which the user must define.
  703. ^^{index!entry!user-controlled format}\cr
  704. \subheading{Control text:}
  705. @t &^^{\>{@t}} Put control text into a \TeX\ \.{\\hbox}.
  706. ^^{text!control!putting into hbox}\cr
  707. @= &^^{\>{@=}} Pass control text verbatim to the output.
  708. ^^{text!control!passing verbatim to output}\cr
  709.  
  710. \summarize{Control codes allowed in \WEB\ files, cont'd}{0.62}
  711.  
  712. \subheading{Spacing:}
  713. @, &^^{\>{@,}} Insert a thin space. ^^{insertion!thin space}\cr
  714. @/ &^^{\>{@/}} Insert a line break. ^^{insertion!line break}\cr
  715. @| &^^{\>{@"|}} Insert an optional line break in an expression.
  716. ^^{insertion!optional line break}\cr
  717. @\# &^^{\>{@\PM}} Force a line break with some extra white space; very
  718. seldom necessary, since blank lines in the source are significant.  Also
  719. begin a preprocessor command. ^^{insertion!line break!with white space}\cr
  720. @+ &^^{\>{@+}} Cancel a line break. ^^{insertion!line break!cancelling}\cr
  721. @\amp &^^{\>{@\amp}} Join left and right with no spaces or line breaks
  722. inbetween. ^^{joining}\cr 
  723. \subheading{Pseudo (invisible) operators:}
  724. @e & Invisible (pseudo-) expression. ^^{pseudo-!expression}\cr
  725. @; &^^{\>{@;}} Invisible (pseudo-) semicolon. ^^{pseudo-!semicolon}\cr
  726. @: &^^{\>{@":}} Invisible (pseudo-) colon. ^^{pseudo-!colon}\cr
  727.  
  728. }
  729.  
  730. \subsubsection Special format for language changes.
  731.  
  732. The most general form of a language command is
  733.  
  734. {\codemode
  735. @\It{[}L\It{]}\It{l}\math\,\math\It{text}[\It{options}]
  736. \Par
  737. }
  738. \noindent where $l$~is a language symbol, \It{text} is converted into a
  739. hyphenated option, and \It{options} have the same syntax as on the command
  740. line.  For example,
  741.  
  742. {\codemode
  743. @n9[-n&]
  744. \Par
  745. }
  746. \noindent means set the language to \Fortran--90 and use free-form syntax
  747. with the ampersand as the continuation character.
  748.  
  749. \summarize{Control codes allowed in change files}{0.62}
  750. ^^[change file!control codes] ^^[commands!control codes!in change file]
  751. The folllowing commands are allowed in change files. They \It{must} begin in
  752. column~1. Any line that does not begin with one of these commands is a comment.
  753.  
  754. @x &^^{\>{@x}} Begin a change file entry.\cr
  755. @y &^^{\>{@y}} End the old code; begin the replacement code.\cr
  756. @z &^^{\>{@z}} End the change file entry.\cr
  757. \medalign
  758. @c &^^{\>{@c}} Set language to~C.^^{language!changing}\cr
  759. @c++ &^^{\>{@c++}} Set language to~\Cpp.^^{language!changing}\cr
  760. @n &^^{\>{@n}} Set language to \Fortran--77.\cr
  761. @n9 &^^{\>{@n9}} Set language to \Fortran--90.\cr
  762. @r &^^{\>{@r}} Set language to \Ratfor--77.\cr
  763. @r9 &^^{\>{@r9}} Set language to \Ratfor--90.\cr
  764. @L\It{l} &^^{\={@l}{@L{\it l}}} Set language to~$l$.\cr
  765. \medalign
  766. @[ &^^{\>{@[}} Switch into code mode.  (Use for column-oriented language
  767. such as \Fortran--77.)^^{code!mode}\cr 
  768. @] &^^{\>{@]}} Switch out of code mode.\cr
  769.  
  770. \subsubsection The null change file.
  771. ^^[change file!null] ^^[file!null]
  772.  
  773. When no change file is specified on the command line, the \WEB\ processors
  774. attempt to open and read from the so-called ``null file.''  (This file may or
  775. may not actually exist in the directory structure, depending on the
  776. system.)  The name of 
  777. this file, which is permanently empty, depends on the operating system and
  778. becomes the default value of 
  779. the style-file option \.{null\_file} according to the following table:
  780. $$\vbox{\offinterlineskip
  781. \halign{\vrule\vrule#&\strut\quad#\quad\hfil&\vrule#&\hfil\quad\tt#\quad\hfil
  782.     &\vrule\vrule#\cr\tablerule\tablerule
  783. &\It{Operating system}&&\It{Name of null file}&\cr
  784. \tablerule\tablerule 
  785. &IBM/PC&&nul&\cr\tablerule
  786. &IBM/MVS&&'NULLFILE'&\cr\tablerule
  787. &VAX/VMS&&nl:&\cr\tablerule
  788. &\Unix\ or other&&/dev/null&\cr\tablerule\tablerule
  789. }}$$
  790. Usually you must do nothing explicitly to access the null file.  However,
  791. if \FWEB\ can't find the default null file on your system, just create an
  792. empty file whose name is \It{null\_name} and insert into the style file the
  793. line ``\.{null\_file "}\It{null\_name}\.{"}''.
  794.  
  795. \summarize{Commenting modes}{0.75}
  796. ^^[commenting style]
  797. ^^[mode!commenting] ^^{\CS{cmntfont}} ^^{\CS{tenrm}} 
  798. \FWEB\ allows a variety of commenting styles.  The visible comments are in
  799. the font \.{\\cmntfont}, which defaults to~\.{\\tenrm}.
  800.  
  801. \subheading{Invisible comments:}
  802. @z...@x &^^{\>{@z}} ^^{\>{@x}} If a source or include file begins
  803. with~\atcmd{z}, then all material is skipped until and including a line
  804. beginning in column~1 with~\atcmd{x}.\cr
  805. @\% &^^{\>{@\PC}} All material until and including the next newline is
  806. completely ignored.\cr
  807. \subheading{Visible comments:}
  808. /*...*/ &^^{\>{/*...*/}} A long comment (may extend over several lines).
  809. ^^{comment!long}\cr
  810. //... &^^{\>{//...}} A short comment (terminated by next newline).  
  811. ^^{comment!short} 
  812. (In \Fortran\ 
  813. or \Ratfor, this must be turned on explicitly with one of the command-line
  814. options~`\.{-n/}', `\.{-r/}', or~`\hbox{\.{-/}}'.)\cr
  815. !... &^^{\>{"!...}} A short comment in \Fortran\ or \Ratfor.  This must be
  816. turned 
  817. on explicitly with one of the command-line options~`\.{-n!}', `\.{-r!}',
  818. or~`\.{-!}'.\cr
  819. !!... &^^{\>{"!"!...}} A short comment in \Fortran\ or \Ratfor.\cr
  820. @(...@) &^^{\>{@(}} A meta-comment.  The material between~\atcmd{(}
  821. and~\atcmd{)} is typeset in a verbatim environment, and is appropriately
  822. passed to the tangled output.  (See the style-file parameters \.{meta.*}.)
  823. ^^{comment!meta-}\cr
  824.  
  825. \subsubsection Alternatives for `dot' commands in \Fortran\ and \Ratfor.
  826. ^^{input!alternative operators for}
  827.  
  828. Although \Fortran\ and \Ratfor\ allow standard `dot' commands such
  829. as~`\.{.LT.}', they are considered to be obsolete; more modern alternatives
  830. are preferred.
  831. \input dots
  832.  
  833. \subsubsection Considerations about formatting.
  834. ^^{formatting}
  835.  
  836. The construction
  837.  
  838. {\codemode
  839. @f \It{identifier} \It{old\_identifier}
  840. }
  841. \medskip
  842. \noindent makes \It{identifier} behave like \It{old\_identifier}.  
  843.  
  844. The \It{old\_identifier} may be one of the following special names,
  845. which insert extra spaces according to the positions of the underscores and
  846. behave as the part of speech indicated by the base names.  These are useful
  847. for dealing with macro constructions.
  848.  
  849. {\codemode
  850. $_BINOP_
  851. $_COMMA_
  852. $_EXPR
  853. $_EXPR_
  854. $EXPR_
  855. $UNOP_
  856. }
  857.  
  858. When the current language is \.{TEX}, the format command can be used to
  859. change a category code according to the format
  860.  
  861. {\codemode
  862. @f `\It{\TeX char} \It{new\_cat\_code}
  863. }
  864.  
  865. \summarize{Macro commands}{0.7}
  866. ^^[macros!command summary]
  867. Outer macros, defined by~\.{@d}, ^^{\>{@d}}
  868. are copied to the beginning of the output
  869. file. Inner \WEB\ macros are defined by~\.{@m}. ^^{\>{@m}}
  870. \WEB\ macro definitions in
  871. the definition section are collected at the beginning of the unnamed
  872. module. \WEB\ macro definitions in the code section (deferred definitions)
  873. become known when they are encountered while the code is being output.
  874. \medskip
  875. \WEB\ macro definitions have one of the following three forms:
  876. $$\def\args{{\tt(}args{\tt)} } 
  877. \tt\eqalignno{
  878.     \llap{@m } &\hbox{\it name\args text}\cr
  879.     \llap{@m* } &\hbox{\it name\args text}\cr
  880.     \llap{@m[bfimps*] } &\hbox{\it name\args text}\cr
  881. }$$
  882. In the second form,
  883. the asterisk means that the macro may be recursive, ^^{macro!recursive}
  884. although \It{this feature is not implemented yet}.  In the third form,
  885. which is useful only for \Ratfor, ^^{\>{\Ratfor}}
  886. the brackets means that the contents of this macro
  887. are to be inserted automatically at the beginning of the type of program
  888. unit identified by the characters within the brackets.  ^^{automatic insertion}
  889. ^^{insertion!automatic}
  890. See the text for more information.
  891. \medskip
  892. Macros with a variable number of arguments are indicated by an 
  893. ellipsis ^^{ellipsis "(\noexpand\dots")}, as
  894. in `\atcmd{m\ VAR(x,y,z,...)\ \It{text}}'.
  895. \medskip
  896. Adjacent strings in macro text are automatically concatenated.
  897. ^^{strings!concatenating}
  898. \medskip
  899. The following special tokens can be used in the text of \WEB\ definitions.
  900. Here \It{parameter} means a dummy argument in the argument list of a
  901. function-like macro.
  902.  
  903. \subheading{ANSI C-compatible tokens:}
  904. \#\# &^^{\>{\PM\PM}} Paste together tokens to left and right.
  905.  (ANSI~C-compatible.) ^^{token pasting}
  906.  \cr 
  907. \#\It{parameter} & Convert parameter to string, without expansion.
  908.  (ANSI~C-compatible.) ^^{stringizing}
  909.  \cr
  910. \subheading{Extensions to ANSI~C macro syntax:} ^^{extensions!to ANSI C
  911.  macro syntax} 
  912. \#*\It{parameter} &^^{\>{\PM*}} As above, but pass a quoted string through
  913.  unchanged.\cr 
  914. \#!\It{parameter} &^^{\>{\PM"!}} Don't expand argument.\cr
  915. \#'\It{parameter} &^^{\>{\PM'}} Convert parameter to a single-quoted
  916.  string, without expansion.\cr
  917. \#"\It{parameter} &^^{\>{\PM""}} Convert parameter to a double-quoted
  918.  string, without expansion.\cr
  919. \#0 & ^^{\>{\PM0}} The number of variable arguments.
  920.  ^^{macro!arguments!number of}
  921.  \cr
  922. \#\It{n} & ^^{\>{\PM}$n$} The $n^{\rm th}$ variable argument, counting
  923.  from~1.\cr 
  924. \#\{0\} & ^^{\>{\PM\LB0\RB}} Like~\.{\#0}, but the argument may be a macro or
  925. expression known at output time.\cr
  926. \#\{\It{n}\} & ^^{\>{\PM\LB$n$\RB}} Like~\.{\#$n$}, but the argument may be an
  927.  expression.\cr 
  928. \#[0] & ^^{\>{\PM[0]}} The total number of arguments (fixed plus
  929.  variable).  (The argument may be an expression.)\cr
  930. \#[\It{n}] & ^^{\>{\PM[$n$]}} The $n^{\rm th}$ argument (including the
  931.  fixed ones), counting from~1. (The argument may be an expression.)\cr
  932. \#. & ^^{\>{\PM.}} A comma-separated list of all variable arguments.\cr
  933. \#:0 &^^{\>{\PM":}} Unique statement number (expanded during phase~1).\cr
  934. \#:\It{nnn} & Unique statement number for each invocation of this macro
  935.  (expanded during phase~2).
  936.  ^^{statement!number}
  937.  \cr
  938. \#< &^^{\>{\PM<...@>}} Begin a section name.  (Ends with~\atcmd{>}.)
  939.  ^^{section name!beginning!in macro}
  940.  \cr
  941. \#, &^^{\>{\PM,}} An ``internal'' comma; does not delimit the end of an
  942.  argument.
  943. ^^{commas!as delimiters of macro arguments}
  944. ^^{commas!as part of a macro argument}
  945.  \cr
  946.  
  947. {%\tracingall
  948. \summarize{Preprocessor commands}{0.7}
  949. ^^[commands!preprocessor!summary] ^^[preprocessing]
  950. \WEB\ preprocessor commands may appear in either the definition or the code
  951. part. But \It{beware}: No matter where they appear, they are expanded
  952. during \It{input}, not output.
  953.  
  954. @\#define \Identifier\ &^^{\>{@\PM define}} Define a \WEB\ macro; equivalent
  955. to \atcmd{m}. ^^{\>{@m}} \cr 
  956. @\#undef \Identifier\ &^^{\>{@\PM undef}} Undefine a \WEB\ macro.\cr
  957. \medalign
  958. @\#ifdef \Identifier\ &^^{\>{@\PM ifdef}} Is \WEB\ macro defined? Equivalent to
  959. `\.{\If{} defined \Identifier}'.\cr
  960. @\#ifndef \Identifier\ &^^{\>{@\PM ifndef}} Is \WEB\ macro not defined?
  961. Equivalent to `\.{\If{} !defined \Identifier}'.\cr
  962. \medalign
  963. @\#if \expr^^{\>{@\PM if}}\cr
  964. @\#elif \expr^^{\>{@\PM elif}}\cr
  965. @\#else^^{\>{@\PM else}}\cr
  966. @\#endif^^{\>{@\PM endif}}\cr
  967.  
  968. \summarize{Built-in \FWEB\ macros (A--K)}{0.55}
  969. ^^[macros!built-in!summary of]
  970. Built-in macros are expanded during output while processing the code part.
  971. They all begin with an underscore and are in upper case.
  972. \It{User-defined macros should not 
  973. begin with an underscore or a dollar sign.} In the following argument lists,
  974. \It{string} means a character string that should be surrounded
  975. by quotes.  In a few cases the quotes are optional if the argument is a
  976. single alphanumeric identifier, but don't use this property unless you
  977. really have to.
  978.  
  979. \_A(\It{string}) &^^{\>{\UL A}} The built-in equivalent to~\.{@'\dots'}
  980. or~\.{@"\dots"}.  (Note the extra parentheses required by the built-in.)
  981. ^^{\>{@'}} ^^{\>{@""}}\cr
  982. \_ABS(\expr) &^^{\>{\UL ABS}} Absolute value of \expr.\cr
  983. \_ASSERT(\expr) &^^{\>{\UL ASSERT}} Evaluates \expr; if false, prints an error
  984. message and aborts.\cr
  985. \_COMMENT(\It{string}) &^^{\>{\UL COMMENT}} Generate a comment in the output
  986. file.\cr 
  987. \_DATE &^^{\>{\UL DATE}} A string consisting of the date in the form
  988. \.{"August\ 15,\ 1989"}.\cr 
  989. \_DAY &^^{\>{\UL DAY}} A string consisting of the day of the week in the form
  990.         \.{"Monday"}.\cr 
  991. \_DECR(N) &^^{\>{\UL DECR}} Decrement a macro.\cr
  992. \_DEFINE(defn) &^^{\>{\UL DEFINE}} Deferred macro definition.\cr
  993. \_DO(\It{macro},\It{imin},\It{imax}\It{[,$\Delta i$]}\{\dots\} &^^{\>{\UL
  994. DO}} Repetitively defines \It{macro} as would the \Fortran\ \&{do}~loop
  995. \.{do \It{macro} = \It{imin},\It{imax},$\Delta i$}.\cr
  996. \_DUMPDEF($m_1$,$m_2$,\dots) &^^{\>{\UL DUMPDEF}} Here $m_1$, $m_2$, etc.\
  997. are macro calls (with argument list if appropriate).  The macro definitions
  998. and their expansions are dumped to the terminal.\cr
  999. \_ERROR(\It{string}) &^^{\>{\UL ERROR}} Send \.{string} to the standard error
  1000. message facility.\cr 
  1001. \_EVAL(\expr) &^^{\>{\UL EVAL}} Evaluate a macro expression.\cr
  1002. \_GETENV(\It{name}) &^^{\>{\UL GETENV}} Returns the present value of the
  1003. environment variable \It{name}.^^{variable!environment}\cr
  1004. \_HOME &^^{\>{\UL HOME}} The user's home directory; equivalent to
  1005. \.{\_GETENV(HOME)}.\cr
  1006. \_IF(\expr,$t$,$f$) &^^{\>{\UL IF}} Evaluates \expr. If true, returns~$t$;
  1007. otherwise, returns~$f$.\cr 
  1008. \_IFCASE(\It{expr},\It{case\_0},\dots,\It{case\_n},\It{dflt})
  1009. &^^{\>{\UL IFCASE}} Evaluates \It{expr} to an integer~$m$. If $0 \le m \le n$,
  1010. then \It{case\_m} is selected. Otherwise, the \It{dflt} is
  1011. selected.\cr 
  1012. \_IFDEF(\It{macro},$t$,$f$) &^^{\>{\UL IFDEF}} If \It{macro} is defined,
  1013. returns~$t$; otherwise, returns~$f$.\cr
  1014. \_IFNDEF(\It{macro},$t$,$f$) &^^{\>{\UL IFNDEF}} As above, but returns~$t$ if
  1015. not defined.\cr 
  1016. \_IFELSE(s1,s2,$t$,$f$) &^^{\>{\UL IFELSE}} Compares \.{s1} to \.{s2}. If
  1017. identical, returns~$t$; otherwise, returns~$f$.\cr
  1018. \_INCR(N) &^^{\>{\UL INCR}} Increment a macro.\cr
  1019. \_INPUT\_LINE &^^{\>{\UL INPUT\UL LINE}} Line number (in \WEB\ source file)
  1020. that begins current section.\cr
  1021.  
  1022. \summarize{Built-in \FWEB\ macros (L--Z)}{0.55}
  1023.  
  1024. \_L(\It{string}) &^^{\>{\UL L}} Changes \It{string} to lower case.\cr
  1025. \_LANGUAGE &^^{\>{\UL LANGUAGE}} An identifier such as~`\.{\_C}'
  1026. ^^{\>{\UL C}} ^^{\>{\UL CPP}}
  1027. ^^{\>{\UL N}} ^^{\>{\UL N90}}
  1028. ^^{\>{\UL R}} ^^{\>{\UL R90}}
  1029. ^^{\>{\UL X}}
  1030.     depending on the current language. (See the table below under
  1031.     \.{\_LANGUAGE\_NUM}.) Intended 
  1032.     to be used with an \.{\_IFELSE}.\cr 
  1033. \_LANGUAGE\_NUM &^^{\>{\UL LANGUAGE\UL NUM}} An integer according to the
  1034.     following table; intended to be used with an \.{\_IFCASE}.
  1035.     \endgraf
  1036.     \LANBUILTINS\cr
  1037. \_LEN(string) &^^{\>{\UL LEN}} Length of (unexpanded) argument interpreted as a
  1038. character string.\cr 
  1039. \_M(defn) &^^{\>{\UL M}} Equivalent to \.{\_DEFINE}.\cr
  1040. \_MAX($a$,$b$) &^^{\>{\UL MAX}} Maximum of the two expressions~$a$ and~$b$.\cr
  1041. \_MIN($a$,$b$) &^^{\>{\UL MIN}} Minimum of~$a$ and~$b$.\cr
  1042. \_MODULE\_NAME &^^{\>{\UL MODULE\UL NAME}} Name of present \WEB\ module.\cr
  1043. \_MODULES &^^{\>{\UL MODULES}} The total number of \It{independent} modules:
  1044. namely, the total number of independent module names, plus~1 for the
  1045. unnamed module.\cr
  1046. \_OUTPUT\_LINE &^^{\>{\UL OUTPUT\UL LINE}} Current line number of tangled
  1047.     output.\cr 
  1048. \_P &^^{\>{\UL P}} The C~preprocessor symbol~'\.{\#}'; a synonym for
  1049. ``\.{\_UNQUOTE("\#")}''.\cr
  1050. \_POW($x$,$y$) &^^{\>{\UL POW}} Exponentiation: $x^y$.\cr
  1051. \_ROUTINE &^^{\>{\UL ROUTINE}} In \Ratfor\ mode, expands to a string built of 
  1052. the name of the current program, function, or subroutine; not useful for other
  1053. languages, for which it expands to the empty string.\cr
  1054. \_SECTION\_NUM &^^{\>{\UL SECTION\UL NUM}} Number of current \WEB\ section.\cr
  1055. \_SECTIONS &^^{\>{\UL SECTIONS}} The maximum section number as understood
  1056. by \WEAVE.\cr 
  1057. \_STRING(s) &^^{\>{\UL STRING}} Expands its argument, then stringizes it
  1058. according to~\.{\#*}.\cr
  1059. \_STUB(name) &^^{\>{\UL STUB}} References to undefined modules 
  1060.     ^^{modules!undefined}
  1061.     are automatically replaced by a call to this macro, with the module
  1062.     name as argument.\cr
  1063. %\_SWITCH() &^^{\>{\UL SWITCH}} \It{Not implemented yet}.\cr
  1064. \_TIME &^^{\>{\UL TIME}} A string consisting of the local time in the form
  1065. \.{"19:59"}.\cr 
  1066. \_TRANSLIT(\It{string},\It{from},\It{to}) &^^{\>{\UL TRANSLIT}} Interprets
  1067. all arguments as 
  1068. character strings; replaces the \\{from} characters in~\\{s} by the
  1069. corresponding \\{to}~characters.\cr 
  1070. \_U(\It{string}) &^^{\>{\UL U}} Changes \It{string} to upper case.\cr
  1071. \_UNDEF(\It{macro}) &^^{\>{\UL UNDEF}} Undefine a macro.\cr
  1072. \_UNQUOTE(\It{string}) &^^{\>{\UL UNQUOTE}} Returns \It{string},
  1073. without the surrounding quotes. \cr
  1074. \_VERBATIM(\It{string}) &^^{\>{\UL VERBATIM}} Obsolete name for
  1075. \.{\_UNQUOTE}.\cr 
  1076. \_VERSION &^^{\>{\UL VERSION}} A string built out of the \.{FWEB} version
  1077. number---e.g., \hbox{\.{"\FWEBversion"}}.\cr 
  1078.  
  1079. }
  1080.  
  1081. \summarize{Ratfor\ commands}{0.5}
  1082. ^^[Ratfor:\RATFOR!commands!summary of]
  1083. Select \Ratfor--77 with~\atcmd{r} or~\atcmd{r7}; select \Ratfor--90
  1084. with~\atcmd{r9}. 
  1085. Disable \Ratfor\ statement translation with command-line option~`\.{-q}'
  1086. (obsolete). In all cases, the construction~$\stmt$ can be replaced by a simple
  1087. statement terminated by a semicolon.
  1088. ^^{\>{-q}}
  1089. \endgraf
  1090.  
  1091. \subheading{Ratfor--77 commands:}
  1092. break; &^^{\<{break}} Exit loop or \&{switch} immediately.\cr
  1093. case $i$: &^^{\<{case}} Used only inside \&{switch}.\cr
  1094. default:&^^{\<{default}} Used only inside \&{switch}.\cr
  1095. do \dots; \stmt &^^{\<{do}} \Fortran's \&{do} statement. (The semicolon is
  1096. required only when the \&{do} is followed by a simple statement; it is
  1097. optional when followed by a left brace.)\cr
  1098. else \stmt &^^{\<{else}} Used in conjunction with \&{if}.\cr
  1099. for($a$;$b$;$c$) \stmt\ &^^{\<{for}} Execute~$a$. Test~$b$. If true,
  1100. execute body. Execute~$c$. Test~$b$ again and iterate.\cr
  1101. if(\cond) \stmt\ &^^{\<{if}} \Fortran's \&{if}\dots\&{then}.\cr
  1102. next; &^^{\<{next}} Go to bottom of loop.\cr
  1103. repeat \stmt\ until(\cond); &^^{\<{repeat}} Execute body. If \cond\ is
  1104. true, iterate.\cr 
  1105. return \expr; &^^{\<{return}} Return value from function.\cr
  1106. switch(\expr) \stmt &^^{\<{switch}} Select various cases.  (Cases fall
  1107. through unless terminated by \&{break}.)\cr
  1108. while(\cond) \stmt\ &^^{\<{while}} If \cond\ is true, execute body of loop.\cr
  1109. \subheading{Additional Ratfor--90 commands:}
  1110. contains: &^^{\<{contains}} Note the colon.\cr
  1111. interface \It{name} \stmt\ &^^{\<{interface}} Used as in \Fortran--90, but
  1112. note the braces.\cr
  1113. interface operator(\It{operator}) \stmt\ &As in \Fortran--90.\cr
  1114. interface assignment(\It{assignment}) \stmt\ &As in \Fortran--90.\cr
  1115. module \It{name} \stmt\ &^^{\<{module}} As in \Fortran--90.\cr
  1116. private: &^^{\<{private}} Note the colon.\cr
  1117. sequence: &^^{\<{sequence}} Note the colon.\cr
  1118. type \It{name} \stmt; &^^{\<{type}} Note the semicolon.\cr
  1119. where(\expr) \stmt\ &^^{\<{where}} \Fortran--90 array operations; may be
  1120. followed by an optional \&{else} clause.\cr
  1121.  
  1122. Caviats and nuances about \FWEB\ \Ratfor:
  1123. ^^[\Ratfor!caviats]
  1124.  
  1125. \newfeature
  1126. \feature: Numeric statement labels must be followed by a colon; they should
  1127. be first on their line.
  1128.  
  1129. \feature: The quoting convention for characters and strings follows that
  1130. of~C:  Single-quote single characters, double-quote strings.
  1131.  
  1132. \feature: In a \&{switch}, cases fall through to the next case unless
  1133. terminated by \&{break} (just as in~C).
  1134.  
  1135. \feature: The \&{do} statement must be terminated by a semicolon if
  1136. followed by a simple statement.  (It's unnecessary if followed by a left
  1137. brace that begins a compound statement.)
  1138.  
  1139. \feature: Use \.{\&\&} and~\.{||} for the logical AND and OR.
  1140.  
  1141. \feature: Do not use an \&{end} statement at the very end of a program
  1142. unit; it is added automatically when the closing brace is sensed.
  1143.  
  1144. \def\TEXTs{sample\BS\_id}\def\TEXT{sample\_id}
  1145.  
  1146. \summarize{Code mode and the principal {\tt fwebmac} typesetting macros}{0.5}
  1147. ^^[macros!typesetting]
  1148. The construction \.{\vertbar\dots\vertbar} signifies code mode; ^^{code!mode}
  1149. it may be used in \TeX\ text 
  1150. (including comments and module names) to typeset code or identifiers
  1151. between the bars.  When code mode is used, entries are made
  1152. in the index.  Alternatively, the following macros may be used; these do
  1153. not make entries in the index:
  1154.  
  1155. \BS Wtypewriter\{\TEXTs\} &^^{\CS{Wtypewriter}} Typeset in typewriter
  1156. type, such as ``\.{\TEXT}''.\cr 
  1157. \BS Wshort\{x\} &^^{\CS{Wshort}} Use for single-character identifiers,
  1158. such as~``\|x''.  (Do not use \WEB's shorthand notation~``\.{\\|x}'' 
  1159. ^^{\CS{"|}}
  1160. for this purpose, as the bar gets confused with the entry into code mode.)\cr
  1161. \BS Wid\{\TEXTs\} &^^{\CS{Wid}} Ordinary identifiers, such as
  1162. ``\\{\TEXT}''.\cr 
  1163. \BS Wreserved\{\TEXTs\} &^^{\CS{Wreserved}} For reserved words, such as
  1164. ``\&{\TEXT}''.\cr 
  1165. \BS Wintrinsic\{\TEXTs\} &^^{\CS{Wintrinsic}} For intrinsic functions,
  1166. such as ``\IF{\TEXT}''.\cr 
  1167.  
  1168. \noindent In the arguments of the above macros, you must precede the special
  1169. characters ``\.{\ \\\#\%\$\^\{\}\~\&\_}'' by a backslash.  
  1170. \medskip
  1171. For brevity, the above macros are equivalenced to shorter macros, as
  1172. follows:
  1173. \input equiv
  1174.  
  1175. \def\acd(#1){(\.{0x#1})}
  1176.  
  1177. \summarize{Escape sequences}{0.5}
  1178. ^^[escape sequences]
  1179. \FWEB\ follows ANSI~C in recognizing the following escape sequences within
  1180. strings. (The corresponding \&{ASCII} code is in parentheses.)
  1181.  
  1182. \BS' \acd(27) & \It{Literal apostrophe}.\cr
  1183. \BS" \acd(22) & \It{Literal quotation mark}.\cr
  1184. \BS?$\vphantom{a}$ \acd(3F) & \It{Literal question mark}.\cr
  1185. \BS\BS\ \acd(5C) & \It{Literal backslash}.\cr
  1186. \BS a \acd(07) & \It{Alert}---ring the bell or print visual alert.\cr
  1187. \BS b \acd(08) & \It{Horizontal backspace}.\cr
  1188. \BS f \acd(0C) & \It{Form feed}---force output device to begin a new page.\cr
  1189. \BS n \acd(0A) & \It{Newline}---move to next line.\cr
  1190. \BS r \acd(0D) & \It{Carriage return}---move to beginning of line.\cr
  1191. \BS t \acd(09) & \It{Horizontal tab}---move to next tab mark.\cr
  1192. \BS v \acd(0B) & \It{Vertical tab}---move to next tab mark.\cr
  1193. \BS \It{NNN} & \It{Octal number}.\cr
  1194. \BS x\It{NN} & \It{Hexadecimal number}.\cr
  1195.  
  1196. \summarize{Conventions for \FWEAVE's identifiers}{0.7}
  1197. Following are the interpretation of the various fonts used in the output
  1198. produced by \FWEAVE.  Subscripts mean the number of the section in which the
  1199. identifier was defined.  In the index, underlined section numbers mean the
  1200. identifier was defined there.
  1201.  
  1202. \subheading{Automatically-generated entries:}
  1203. {\it italics} & An ordinary identifier such as~\|x or~\\{xyz}.\cr
  1204. {\it mark\/}$\WIN0{90}$ & An identifier explicitly marked with~\.{@[}.\cr
  1205. {\it name\/}$\WIN1{91}$ & A function name such as \\{main} defined in
  1206. section~98.\cr 
  1207. {\it inner\/}$\WIN2{92}$ & A \WEB\ macro.\cr
  1208. {\it outer\/}$\WIN3{93}$ & An outer macro.\cr
  1209. {\bf boldface} & A reserved word such as \&{integer}.\cr
  1210. {\bf newtype}$\WIN5{95}$ & A new type created via \&{typedef}.\cr
  1211. {\bfit boldfaced italic} & An intrinsic function such as \IF{sin}.\cr
  1212. {\tt TYPEWRITER} & A \Fortran\ keyword such as \.{BLOCKSIZE}. (These must
  1213. be in upper case.)\cr
  1214. \subheading{User-defined entries:}
  1215. {\tt typewriter} &\.{@.\dots@>}\cr
  1216. {\rm Roman} &\.{@\^\dots@>}\cr
  1217. {\ss user-defined} &\.{@9\dots@>}.  For example, to make an index entry in
  1218. {\ss sans serif} type say ``\.{\\def\\9\#1\{\{\\tenss\#\}\}}''.\cr
  1219.  
  1220. \summarize{Special array processing}{0.7}
  1221. In \Fortran\ and \Ratfor, \FTANGLE\ replaces left and right square brackets 
  1222. (outside of strings) by left and right parentheses.  Thus, brackets can be
  1223. used for array subscripts if one desires.
  1224. \medskip
  1225. When the option `\.{-W[}' is used, \FWEAVE\ replaces square brackets by a
  1226. special \TeX\ macro.  To change the appearance of array indices, redefine
  1227. the macro \.{\\WARRAY}.  ^^{\CS{WARRAY}}
  1228. For example, to subscript indices, say ``\.{\\let \\WARRAY\\WSUB}''.
  1229. \par\par
  1230. ^^{\CS{WSUB}}
  1231. ^^)syntax!summary)
  1232.  
  1233. \appendix M:  CUSTOMIZING via the STYLE FILE.[][20.13.11]
  1234.  
  1235. The default name of the style file is \.{fweb.sty}; ^^{\>{fweb.sty}}
  1236. change that with the
  1237. `\.{-z}'~command-line option.  ^^{\>{-z}}
  1238. \TeX-like comments (beginning with~'\.{\%}') may be included.
  1239. An alphabetized list of the vocabulary commands may be found in the index
  1240. under ``\.{style file, vocabulary}''.
  1241. The command syntax is
  1242.  
  1243. {\codemode
  1244. \It{keyword [=] value}
  1245. }
  1246. \medskip
  1247. \noindent For example,
  1248.  
  1249. {\codemode
  1250. LaTeX.options = "eqalign"
  1251. }
  1252. \medskip
  1253.  
  1254. The style-file parameters are user-specific.  The local style file 
  1255. is intended to be used for changes that are run-specific.  (Contrast that
  1256. with the initialization file \.{.fweb}, ^^{\>{.fweb}}
  1257. which is intended to set the user's
  1258. default environment for all runs.)  Style-file parameters that are intended
  1259. to permanently override \FWEB's defaults should be put into \.{.fweb} by
  1260. using the `\.{+p}'~option. ^^{\>{-p}}
  1261.  
  1262. A mechanism is also provided to aid in installation-wide customization
  1263. ^^{customization!installation-wide}
  1264. done when \FWEB\ is compiled. This
  1265. is explained in the separate documentation about installation and in the
  1266. source file \.{custom.web}. ^^{\>{custom.web}}
  1267.  
  1268. \def\stylehook#1{\subsubsection #1.\par
  1269.     \let\subtitle\empty
  1270.     \kern-\baselineskip}
  1271.  
  1272. \input index.stl
  1273.  
  1274. \input modules.stl
  1275.  
  1276. \input contents.stl
  1277.  
  1278. \input subs.stl
  1279.  
  1280. \input formats.stl
  1281.  
  1282. \input wmisc.stl
  1283.  
  1284. \input t.stl
  1285.  
  1286. \input wtmisc.stl
  1287.  
  1288. \input auto.stl
  1289.  
  1290. \input colors.stl
  1291.  
  1292. \input ccodes.stl
  1293.  
  1294. \appendix N:  MEMORY ALLOCATION.[]
  1295.  
  1296. ^^(memory, dynamic allocation of!summary(
  1297. The command-line option~`\.{-y}' ^^{\>{-y}} ^^{statistics}
  1298. is used to change the default allocation
  1299. for a dynamic memory array, as in~`\.{-ym4000}'.  To query the present
  1300. allocations of variable~\It{aa}, where \It{aa}~is the abbreviation in the
  1301. list below, just say ``\.{-y\It{aa}}'' with no
  1302. numeric argument.  To query everything, say ``\.{-y}''.  
  1303.  
  1304. The option~`\.{-s}' ^^{\>{-s}}
  1305. reports memory-usage statistics at the end of the run.  
  1306. The option~`\.{-sm\It{[n]}}' ^^{\>{-sm}}
  1307. reports allocations of~$n$ or more bytes as they
  1308. occur.  If $n$~is omitted, $n = 10000$ is assumed.
  1309. \medskip
  1310. Here is a brief discussion \It{(not completed yet!)}
  1311. of the dynamic arrays and their abbreviations.  (For more information,
  1312. please study the code.)  
  1313. $$\def\var#1 (#2){\\{#1}~(\.{"#2"})}
  1314. \vbox{\halign{\var #\hfil&\ ---\
  1315.         \vtop{\hsize=0.65\hsize\noindent\hang\strut#\strut}\hfil\cr
  1316. buf\_size (bs)&Size of the change buffer.\cr
  1317. C\_buf\_size (cb)&Buffer size for single-character buffered output in~C.\cr
  1318. cmd\_fmt\_size (cf)&Buffer size for certain output messages in \Ratfor.\cr
  1319. cmd\_msg\_size (cg)&As above.\cr
  1320. delta\_dots (d)&Number of additional entries to reallocate for the \\{dots}
  1321.  array if necessary.\cr
  1322. line\_length (ll)&Line length for \FWEAVE's output. \cr
  1323. longest\_name (ln)&Module names or strings shouldn't be longer than
  1324.  this.\cr
  1325. max\_bytes (b)&Maximum number of bytes in identifiers, index entries, and
  1326.  module names.\cr 
  1327. max\_dtexts (dx)&Maximum number of deferred replacement texts.\cr
  1328. max\_dtoks (dt)&Maximum number of tokens in \FTANGLE's deferred macro pool.\cr
  1329. max\_expr\_chars (lx)&Maximum length of expressions for compound
  1330.  assignments.\cr 
  1331. max\_lbls (lb)&Maximum nesting level in \Ratfor.\cr
  1332. max\_modules (m)&Must be larger than the maximum number of modules.\cr
  1333. max\_names (n)&Maximum number of identifiers, strings, and module names.\cr
  1334. max\_refs (r)&Maximum number of cross-references.\cr
  1335. max\_scraps (s)&Maximum number of scraps during \FWEAVE's parsing.\cr
  1336. max\_texts (x)&Maximum number of replacement texts for \FTANGLE.\cr
  1337. max\_toks (tt)&Maximum number of tokens in \FTANGLE's compressed code.\cr
  1338. max\_toks (tw)&Maximum number of tokens in current code text being parsed by
  1339.  \FWEAVE.\cr
  1340. mbuf\_size (mb)&Size of the area into which macros are expanded. This must
  1341.  be large enough to hold all intermediate levels of expansion as well as the
  1342.  final result. Furthermore, in some complicated situations, especially in
  1343.  \Ratfor, more than one macro buffer can be open at once.\cr
  1344. num\_files (nf)&Number of open files, especially for the \.{@o}~command.\cr
  1345. op\_entries (op)&Size of the table that handles overloaded operators.  A
  1346.  fixed table of length~128 is always used to handle operators such
  1347.  as~`\.{=}'.  The 
  1348.  quantity \\{op\_entries} must be greater than that amount by the number of
  1349.  new names that are explicitly overloaded.\cr
  1350. sbuf\_len (sb)&Length of input line buffer for style file.\cr
  1351. stack\_size (kt)&\FTANGLE's stack size.\cr
  1352. stack\_size (kw)&\FWEAVE's stack size.\cr
  1353. X\_buf\_size (xb)&Size of \TeX's output buffer.\cr
  1354. }}$$
  1355. Thus, for example, to set the maximum number of modules to be 4000, say
  1356. ``\.{-ym4000}''. 
  1357. ^^)memory, dynamic allocation of!summary)
  1358.  
  1359. \appendix O:  CHARACTER SETS.[][19.15.2]
  1360.  
  1361. \FWEB\ works internally with the ASCII character set.  Users of some IBM
  1362. machines may need to be familiar with the EBCDIC character set as well.
  1363.  
  1364. \subsubsection The ASCII character set.
  1365. ^^(character!set!ASCII(
  1366.  
  1367. Here is the ASCII character set, shown in octal, decimal, and hexadecimal.  The
  1368. escape sequences recognized by~C and~\FWEB\ are also shown where
  1369. appropriate.  [This table is a minor modification of that given in the
  1370. excellent book by the Mark Williams Company, {\sl ANSI~C:  A Lexical Guide}
  1371. (Prentice Hall, Englewood Cliffs, New Jersey, 1988), p.~66.]
  1372.  
  1373. \rm\def\ANSI#1\par{\smallbreak
  1374. $$\def\ctrl##1{$\langle${\bf ctrl--{\tt##1}}$\rangle$\ }
  1375. \vbox{\halign{\hfil0##\unskip\qquad&\hfil##\unskip\qquad
  1376. &\hfil0x\tt##\unskip\qquad&\hfil\tt##\unskip\qquad
  1377. &\vtop{\hsize=0.5\hsize 
  1378. \noindent\hang\strut##\strut}\hfil\cr#1}}$$\vfill\eject}
  1379. \ANSI
  1380. 00 & 0 & 00 & NUL & \ctrl{@} Null character\cr
  1381. 01 & 1 & 01 & SOH & \ctrl{A} Start of header\cr
  1382. 02 & 2 & 02 & STX & \ctrl{B} Start of text\cr
  1383. 03 & 3 & 03 & ETX & \ctrl{C} End of text\cr
  1384. 04 & 4 & 04 & EOT & \ctrl{D} End of transmission\cr
  1385. 05 & 5 & 05 & ENQ & \ctrl{E} Enquiry\cr
  1386. 06 & 6 & 06 & ACK & \ctrl{F} Positive acknowledgement\cr
  1387. 07 & 7 & 07 & BEL & \ctrl{G} Alert (``bell'') (\.{'\\a'})\cr
  1388. 10 & 8 & 08 & BS & \ctrl{H} Backspace (\.{'\\b'})\cr
  1389. 11 & 9 & 09 & HT & \ctrl{I} Horizontal tab (\.{'\\t'})\cr
  1390. 12 & 10 & 0A & LF & \ctrl{J} Line feed (``newline'') (\.{'\\n'})\cr
  1391. 13 & 11 & 0B & VT & \ctrl{K} Vertical tab (\.{'\\v'})\cr
  1392. 14 & 12 & 0C & FF & \ctrl{L} Form feed (\.{'\\f'})\cr
  1393. 15 & 13 & 0D & CR & \ctrl{M} Carriage return (\.{'\\r'})\cr
  1394. 16 & 14 & 0E & SO & \ctrl{N} Shift out\cr
  1395. 17 & 15 & 0F & SI & \ctrl{O} Shift in\cr
  1396. 20 & 16 & 10 & DLE & \ctrl{P} Data link escape\cr
  1397. 21 & 17 & 11 & DC1 & \ctrl{Q} Device control 1 (XON)\cr
  1398. 22 & 18 & 12 & DC2 & \ctrl{R} Device control 2 (tape on)\cr
  1399. 23 & 19 & 13 & DC3 & \ctrl{S} Device control 3 (XOFF)\cr
  1400. 24 & 20 & 14 & DC4 & \ctrl{T} Device control 4 (tape off)\cr
  1401. 25 & 21 & 15 & NAK & \ctrl{U} Negative acknowledgement\cr
  1402. 26 & 22 & 16 & SYN & \ctrl{V} Synchronize\cr
  1403. 27 & 23 & 17 & ETB & \ctrl{W} End of transmission block\cr
  1404. 30 & 24 & 18 & CAN & \ctrl{X} Cancel\cr
  1405. 31 & 25 & 19 & EM & \ctrl{Y} End of medium\cr
  1406. 32 & 26 & 1A & SUB & \ctrl{Z} Substitute\cr
  1407. 33 & 27 & 1B & ESC & \ctrl{[} Escape\cr
  1408. 34 & 28 & 1C & FS & \ctrl{\BS} Form separator\cr
  1409. 35 & 29 & 1D & GS & \ctrl{]} Group separator\cr
  1410. 36 & 30 & 1E & RS & \ctrl{\^} Record separator\cr
  1411. 37 & 31 & 1F & US & \ctrl{\_} Unit separator\cr
  1412.  
  1413. \ANSI
  1414. 40 & 32 & 20 & \.{\ } & Space\cr
  1415. 41 & 33 & 21 & {!} & Exclamation point\cr
  1416. 42 & 34 & 22 & " & Quotation mark (\.{'\\"'})\cr
  1417. 43 & 35 & 23 & \# & Pound (sharp) sign\cr
  1418. 44 & 36 & 24 & \$ & Dollar sign\cr
  1419. 45 & 37 & 25 & \% & Percent sign\cr
  1420. 46 & 38 & 26 & \amp & Ampersand\cr
  1421. 47 & 39 & 27 & ' & Apostrophe (right quote) (\.{'\\''})\cr
  1422. 50 & 40 & 28 & ( & Left parenthesis\cr
  1423. 51 & 41 & 29 & ) & Right parenthesis\cr
  1424. 52 & 42 & 2A & * & Asterisk\cr
  1425. 53 & 43 & 2B & + & Plus sign\cr
  1426. 54 & 44 & 2C & , & Comma\cr
  1427. 55 & 45 & 2D & - & Hyphen (minus sign)\cr
  1428. 56 & 46 & 2E & {.} & Period\cr
  1429. 57 & 47 & 2F & / & Virgule (slash)\cr
  1430. 60 & 48 & 30 & 0\cr
  1431. 61 & 49 & 31 & 1\cr
  1432. 62 & 50 & 32 & 2\cr
  1433. 63 & 51 & 33 & 3\cr
  1434. 64 & 52 & 34 & 4\cr
  1435. 65 & 53 & 35 & 5\cr
  1436. 66 & 54 & 36 & 6\cr
  1437. 67 & 55 & 37 & 7\cr
  1438. 70 & 56 & 38 & 8\cr
  1439. 71 & 57 & 39 & 9\cr
  1440. 72 & 58 & 3A & {:} & Colon\cr
  1441. 73 & 59 & 3B & ; & Semicolon\cr
  1442. 74 & 60 & 3C & $<$ & Less-than (left angle bracket)\cr
  1443. 75 & 61 & 3D & $=$ & Equal sign\cr
  1444. 76 & 62 & 3E & $>$ & Greater-than (right angle bracket)\cr
  1445. 77 & 63 & 3F & {?} & Question mark (\.{'\\?'})\cr
  1446.  
  1447. \ANSI
  1448. 100 & 64 & 40 & {@} & At sign\cr
  1449. 101 & 65 & 41 & A\cr
  1450. 102 & 66 & 42 & B\cr
  1451. 103 & 67 & 43 & C\cr
  1452. 104 & 68 & 44 & D\cr
  1453. 105 & 69 & 45 & E\cr
  1454. 106 & 70 & 46 & F\cr
  1455. 107 & 71 & 47 & G\cr
  1456. 110 & 72 & 48 & H\cr
  1457. 111 & 73 & 49 & I\cr
  1458. 112 & 74 & 4A & J\cr
  1459. 113 & 75 & 4B & K\cr
  1460. 114 & 76 & 4C & L\cr
  1461. 115 & 77 & 4D & M\cr
  1462. 116 & 78 & 4E & N\cr
  1463. 117 & 79 & 4F & O\cr
  1464. 120 & 80 & 50 & P\cr
  1465. 121 & 81 & 51 & Q\cr
  1466. 122 & 82 & 52 & R\cr
  1467. 123 & 83 & 53 & S\cr
  1468. 124 & 84 & 54 & T\cr
  1469. 125 & 85 & 55 & U\cr
  1470. 126 & 86 & 56 & V\cr
  1471. 127 & 87 & 57 & W\cr
  1472. 130 & 88 & 58 & X\cr
  1473. 131 & 89 & 59 & Y\cr
  1474. 132 & 90 & 5A & Z\cr
  1475. 133 & 91 & 5B & {[} & Left bracket\cr
  1476. 134 & 92 & 5C & \ttBS & Backslash (\.{'\\\\'})\cr
  1477. 135 & 93 & 5D & {]} & Right bracket\cr
  1478. 136 & 94 & 5E & {\^} & Circumflex\cr
  1479. 137 & 95 & 5F & \_ & Underscore\cr
  1480.  
  1481. \ANSI
  1482. 140 & 96 & 60 & \.{\`} & Grave (left quote)\cr
  1483. 141 & 97 & 61 & a\cr
  1484. 142 & 98 & 62 & b\cr
  1485. 143 & 99 & 63 & c\cr
  1486. 144 & 100 & 64 & d\cr
  1487. 145 & 101 & 65 & e\cr
  1488. 146 & 102 & 66 & f\cr
  1489. 147 & 103 & 67 & g\cr
  1490. 150 & 104 & 68 & h\cr
  1491. 151 & 105 & 69 & i\cr
  1492. 152 & 106 & 6A & j\cr
  1493. 153 & 107 & 6B & k\cr
  1494. 154 & 108 & 6C & l\cr
  1495. 155 & 109 & 6D & m\cr
  1496. 156 & 110 & 6E & n\cr
  1497. 157 & 111 & 6F & o\cr
  1498. 160 & 112 & 70 & p\cr
  1499. 161 & 113 & 71 & q\cr
  1500. 162 & 114 & 72 & r\cr
  1501. 163 & 115 & 73 & s\cr
  1502. 164 & 116 & 74 & t\cr
  1503. 165 & 117 & 75 & u\cr
  1504. 166 & 118 & 76 & v\cr
  1505. 167 & 119 & 77 & w\cr
  1506. 170 & 120 & 78 & x\cr
  1507. 171 & 121 & 79 & y\cr
  1508. 172 & 122 & 7A & z\cr
  1509. 173 & 123 & 7B & \{ & Left brace\cr
  1510. 174 & 124 & 7C & | & Vertical bar\cr
  1511. 175 & 125 & 7D & \} & Right brace\cr
  1512. 176 & 126 & 7E & $\sim$ & Tilde\cr
  1513. 177 & 127 & 7F & DEL & Delete\cr
  1514.  
  1515. ^^)character!set!ASCII)
  1516.  
  1517. \subsubsection The EBCDIC character set.
  1518.  
  1519. ^^(character!set!EBCDIC(
  1520.  
  1521. \It{This will be completed someday.}
  1522. ^^)character!set!EBCDIC)
  1523.  
  1524. \appendix P: INDEX.[]
  1525.  
  1526. The page numbers in the index for this manual can appear in a variety of
  1527. fonts. These have the following meaning:
  1528. $$\vbox{\halign{#\hfil&\ ---\ #\hfil\cr
  1529. Roman&The keyword or phrase is {mentioned} here.\cr
  1530. $\underline{\hbox{Roman}}$&$\underline{\hbox{Definition}}$ of concept or
  1531.     keyword.\cr 
  1532. {\bf boldfaced}&Reference to an entire {\bf topic}.\cr
  1533. {\it italics}&An \It{example} is given.\cr}
  1534. }$$
  1535.  
  1536. ^^{type|see{fonts}}
  1537.  
  1538. \let\underline\relax
  1539.  
  1540. \Wcon % Print table of contents.
  1541.